<template>
    <div class="satisfaction-survey">
        <!-- 顶部导航栏 -->
        <van-nav-bar title="满意度调研" left-arrow @click-left="onBack" />

        <div class="survey-container">
            <!-- 插画区域 -->
            <div class="illustration-section">
                <div class="illustration">
                    <!-- 左侧女性 -->
                    <div class="person female">
                        <div class="head">
                            <div class="hair"></div>
                            <div class="glasses"></div>
                        </div>
                        <div class="body">
                            <div class="coat"></div>
                            <div class="dress"></div>
                        </div>
                        <div class="tablet"></div>
                        <div class="arm pointing"></div>
                    </div>

                    <!-- 右侧男性 -->
                    <div class="person male">
                        <div class="head">
                            <div class="hair"></div>
                            <div class="beard"></div>
                        </div>
                        <div class="body">
                            <div class="shirt"></div>
                            <div class="pants"></div>
                        </div>
                        <div class="book"></div>
                        <div class="arm pointing-right"></div>
                    </div>

                    <!-- 漂浮的文档 -->
                    <div class="document red-doc">
                        <div class="pie-chart"></div>
                    </div>
                    <div class="document green-doc">
                        <div class="bar-chart"></div>
                    </div>
                    <div class="document blue-doc">
                        <div class="checklist"></div>
                    </div>

                    <!-- 花瓶 -->
                    <div class="vase">
                        <div class="vase-body"></div>
                        <div class="leaves"></div>
                        <div class="flowers"></div>
                    </div>
                </div>
            </div>

            <!-- 文字内容区域 -->
            <div class="content-section">
                <h1 class="survey-title">满意度调研</h1>
                <p class="survey-description">
                    诚邀您参与满意度调研，通过1-2分钟写下<br>
                    您的感受。您的每一个建议都将帮助我们变<br>
                    得更好
                </p>
            </div>

            <!-- 按钮区域 -->
            <div class="button-section">
                <van-button type="primary" size="large" block round @click="startSurvey" class="start-button">
                    开始评价
                </van-button>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

const onBack = () => {
    router.back();
};

const startSurvey = () => {
    // 跳转到问卷列表页面
    router.push('/questionnaire-list');
};
</script>

<style scoped>
.satisfaction-survey {
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.survey-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-top: 40px;
}

/* 插画区域 */
.illustration-section {
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration {
    position: relative;
    width: 280px;
    height: 180px;
}

/* 人物样式 */
.person {
    position: absolute;
    width: 60px;
    height: 80px;
}

.person.female {
    left: 20px;
    top: 20px;
}

.person.male {
    right: 20px;
    top: 40px;
}

/* 头部 */
.head {
    width: 30px;
    height: 30px;
    background: #f4a460;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.hair {
    width: 35px;
    height: 20px;
    background: #8b4513;
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: -5px;
    left: -2.5px;
}

.glasses {
    width: 24px;
    height: 12px;
    border: 2px solid #333;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 3px;
}

.glasses::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background: #333;
    top: 2px;
    right: -4px;
}

.beard {
    width: 20px;
    height: 8px;
    background: #8b4513;
    border-radius: 0 0 50% 50%;
    position: absolute;
    bottom: -2px;
    left: 5px;
}

/* 身体 */
.body {
    margin-top: 5px;
    position: relative;
}

.coat {
    width: 40px;
    height: 25px;
    background: #dc143c;
    border-radius: 8px;
    margin: 0 auto;
}

.dress {
    width: 35px;
    height: 20px;
    background: #4b0082;
    border-radius: 0 0 8px 8px;
    margin: 0 auto;
}

.shirt {
    width: 35px;
    height: 25px;
    background: #ffd700;
    border-radius: 8px;
    margin: 0 auto;
}

.pants {
    width: 30px;
    height: 20px;
    background: #2f4f4f;
    border-radius: 0 0 8px 8px;
    margin: 0 auto;
}

/* 手臂和物品 */
.arm {
    position: absolute;
    width: 15px;
    height: 3px;
    background: #f4a460;
    border-radius: 2px;
}

.arm.pointing {
    top: 15px;
    right: -10px;
    transform: rotate(-30deg);
}

.arm.pointing-right {
    top: 20px;
    left: -10px;
    transform: rotate(30deg);
}

.tablet {
    width: 20px;
    height: 15px;
    background: #333;
    border-radius: 3px;
    position: absolute;
    top: 10px;
    left: -15px;
}

.book {
    width: 18px;
    height: 12px;
    background: #8b4513;
    border-radius: 2px;
    position: absolute;
    top: 15px;
    left: -12px;
}

/* 漂浮的文档 */
.document {
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

.document:nth-child(1) {
    animation-delay: 0s;
}

.document:nth-child(2) {
    animation-delay: 1s;
}

.document:nth-child(3) {
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

.red-doc {
    width: 25px;
    height: 20px;
    background: linear-gradient(45deg, #ff6b6b 50%, #fff 50%);
    top: 10px;
    left: 50px;
}

.green-doc {
    width: 20px;
    height: 25px;
    background: linear-gradient(45deg, #51cf66 50%, #fff 50%);
    top: 60px;
    left: 80px;
}

.blue-doc {
    width: 30px;
    height: 15px;
    background: linear-gradient(45deg, #339af0 50%, #fff 50%);
    top: 30px;
    right: 80px;
}

/* 图表元素 */
.pie-chart {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: conic-gradient(#ff6b6b 0deg 180deg, #fff 180deg 360deg);
    position: absolute;
    top: 6px;
    left: 8px;
}

.bar-chart {
    width: 12px;
    height: 8px;
    position: absolute;
    top: 8px;
    left: 4px;
}

.bar-chart::before,
.bar-chart::after {
    content: '';
    position: absolute;
    width: 2px;
    background: #51cf66;
    bottom: 0;
}

.bar-chart::before {
    height: 6px;
    left: 2px;
}

.bar-chart::after {
    height: 4px;
    left: 5px;
}

.checklist {
    width: 12px;
    height: 8px;
    position: absolute;
    top: 3px;
    left: 9px;
}

.checklist::before {
    content: '✓';
    color: #339af0;
    font-size: 8px;
    position: absolute;
    top: 0;
    left: 0;
}

/* 花瓶 */
.vase {
    position: absolute;
    right: 10px;
    bottom: 20px;
}

.vase-body {
    width: 15px;
    height: 20px;
    background: #1e3a8a;
    border-radius: 50% 50% 0 0;
    position: relative;
}

.leaves {
    width: 20px;
    height: 15px;
    background: #22c55e;
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: -10px;
    left: -2.5px;
}

.flowers {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    position: absolute;
    top: -15px;
    left: 3.5px;
}

/* 文字内容区域 */
.content-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.survey-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.survey-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 按钮区域 */
.button-section {
    width: 100%;
    padding: 0 20px;
}

.start-button {
    height: 48px;
    font-size: 18px;
    font-weight: 500;
    background: linear-gradient(135deg, #338aff 0%, #5b9cff 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(51, 138, 255, 0.3);
}

.start-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(51, 138, 255, 0.3);
}
</style>